<%@ page language="java" import="java.util.Map" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
response.setHeader("Pragma","No-cache");    
response.setHeader("Cache-Control","no-cache");    
response.setDateHeader("Expires", -10);

Map<String,String> authCode = (Map<String,String> )request.getSession().getAttribute("SYS_USER_AUTHCODE");
boolean kuFlag = authCode.containsKey("mainpage.ku");

String biCssStyle = "display:none;";
if(kuFlag){
	biCssStyle = "";
}
%>

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>首页</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
	name="viewport">
<!-- Bootstrap 3.3.5 -->
<link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css"
	rel="stylesheet">
<link
	href="//cdn.bootcss.com/font-awesome/4.4.0/css/font-awesome.min.css"
	rel="stylesheet">
<!-- DataTables -->
<link rel="stylesheet"
	href="../../plugins/datatables/dataTables.bootstrap.css">
<!-- Theme style -->
<link rel="stylesheet" href="../../dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="../../dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="../../index.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
<style type="text/css">


</style>
</head>

<body>
	<div>
		<div class="bg-custom">

			<div class="col-md-4 col-lg-4 padding-left-0">
				<!-- update time start -->
				<div class="row" style="display:none;">
					<div class="col-xs-10 padding-right-0">
						<div class="col-xs-2 update_time_clock">
							<img style="padding-top: 5px;"
								src="../../mainpage/img/clock_icon.png" />
						</div>
						<div class="col-xs-10 update_time_text">
							<lable>最后更新时间:</lable>
							<lable id="mp_update_time">2016-06-30 12:03:04</lable>
						</div>

					</div>
					<div class="col-xs-2 update_time_angle">
						<div>
							<img style="padding-left: 5px; padding-top: 3px;"
								src="../../mainpage/img/little_plane.png" />
						</div>
					</div>
					<!-- update time end -->
				</div>
				<!-- BI信息 start-->
				<%@ include file="subPage_bi.jsp"%>
				<!-- BI信息 end-->
				<!-- 航班动态 start-->
				<%@ include file="subPage_planeinfo.jsp"%>
				<!-- 航班动态 end-->

			</div>
			<div class="col-md-4 col-lg-4 padding-0">
				<div class="row-fulid dashboard-panel-lr-0"">
					<!-- 航班实时运行图 start-->
					<%@ include file="subPage_map.jsp"%>
					<!-- 航班实时运行图 end-->

					<!-- 业务健康度 start-->
					<%@ include file="subPage_health.jsp"%>
					<!-- 业务健康度 end-->
				</div>

			</div>
			<div class="col-md-4 col-lg-4 padding-0">
				<div class="row-fulid dashboard-panel-lr-12">
					<%@ include file="subPage_flowmon.jsp"%>
					<%@ include file="subPage_perfmon.jsp"%>
					<%@ include file="subPage_warnmon.jsp"%>
				</div>
			</div>
		</div>


	</div>


	<div class="modal fade" id="mp_planeInfo" tabindex="-1" role="dialog"
		aria-labelledby="mp_planeInfo" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="mp_planeInfo">航班详情</h4>
				</div>
				<div class="modal-body modal-body-custom">
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>航班号</h5></div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_flight_code">-</h5>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>航线</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_flight_line">-</h5>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>起飞时间</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_fly_time">-</h5>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>到达时间</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_land_time">-</h5>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>飞行状态</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_flight_status">-</h5>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>起飞地天气情况</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_from_weather">N/A</h5>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>降落地天气情况</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_to_weather">N/A</h5>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>上网总人数</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_online_people">N/A</h5>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>局域网总流量</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_total_flow">N/A</h5>
						</div>
					</div>
					<!--  
					<div class="row">
						<div class="col-sm-4 bg-aqua"><h5>上网速率</div>
						<div class="col-sm-8 bg-gray">
							<h5 id="mp_speed">6Mbps</h5>
						</div>
					</div>-->
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>

	<!-- ./wrapper -->
	<script src="//cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
	<script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
	<script src="../../plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="../../plugins/datatables/dataTables.bootstrap.min.js"></script>
	<script src="//cdn.bootcss.com/echarts/2.2.7/echarts.js"></script>


	<script src="../../plugins/common/common-util.js"></script>
	<script src="../../mainpage/js/dashboard-mapdata.js"></script>
	<script src="../../mainpage/js/dashboard-health.js"></script>
	<script src="../../mainpage/js/dashboard-warnmon.js"></script>
	<script src="../../mainpage/js/dashboard-perfmon.js"></script>
	<script src="../../mainpage/js/dashboard-flowmon.js"></script>
	<script src="../../mainpage/js/main.js"></script>

	<!-- page script -->
	<script type="text/javascript">
		var KUFLAG = <%=kuFlag%>;
		var echarts = null;
		var echartsTheme = "default";
		var mp_refresh_time = 20000;
		var MP_GL_MAP = null;
		var MP_GL_HEALTH = null;
		var MP_GL_FLOW = null;
		var MP_GL_WARN = null;
		$(function() {
			require.config({
				paths : {
					echarts : '//cdn.bootcss.com/echarts/2.2.7'
				}
			});
			require([ 'echarts', 'echarts/chart/line', 'echarts/chart/pie',
					'echarts/chart/map', 'echarts/chart/bar' ], function(ec) {
				echarts = ec;
				MP_GL_MAP = MainPage_MAP.createMap("mainpage_map");
				MP_GL_HEALTH = MainPage_Health.createCircle("mainpage_health");
				MP_GL_FLOW = MainPage_Flow.createFlowmon("mainpage_flowmon");
				MP_GL_WARN = MainPage_Warn.createWarnmon("mainpage_warnmon");
				var perfmon = createPerfmon("mainpage_perfmon");

				$(window).resize(function() {
					MP_GL_MAP.resize();
					MP_GL_HEALTH.resize();
					MP_GL_FLOW.resize();
					perfmon.resize();
					MP_GL_WARN.resize();
				});
			});

			//调用ajax加载数据

			//var table = $('#mp_plane_flightlist').DataTable(mp_dataTableconfig);

			MainPage.loadBiInfo();
			MainPage.loadPlaneList();

			//setTimeout(MainPage.nextPage, mp_refresh_time);

		});
	</script>


</body>
</html>
